#-*- coding:UTF-8 -*-
__author__ = 'Frank Yang <frankyang418@gmail.com>'
__date__ = "13-5-16 上午9:44"
__doc__ = u"BaseHandler"

import tornado.web
from lib.mixin.FlashMessage import FlashMessageMixin
from lib.mixin.Session import SessionMixin


class BaseRequestHandler(tornado.web.RequestHandler, FlashMessageMixin, SessionMixin):
    def get_current_user(self):
        return self.session.CURRENT_USER if 'CURRENT_USER' in self.session else None